﻿using MusicStore.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MusicStore.Controllers
{
    public class OrderController : Controller
    {
        MusicStoreDB db = new MusicStoreDB();
        // GET: Order
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult Create()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Create(Order newOrder)
        {
            if (ModelState.IsValid)
            {
                db.Orders.Add(newOrder);
                db.SaveChanges();
            }

            return View();
        }
    }
}